﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace BactCommonGUI
{
    public class ColorManager
    {
        private ColorManager instance;
        private Dictionary<Type, Color> colorMap;

        private List<Color> availableColors;
        protected List<Color> AvailableColors
        {
            get
            {
                return availableColors;
            }
            set
            {
                this.availableColors = value;
            }
        }

        protected Dictionary<Type, Color> ColorMap
        {
            get
            {
                return colorMap;
            }
            set
            {
                this.colorMap = value;
            }
        }

        private ColorManager()
        {
            this.colorMap = new Dictionary<Type, Color>();
            AvailableColors = new List<Color>();

            availableColors.Add(Colors.Black);
            availableColors.Add(Colors.Blue);
            availableColors.Add(Colors.Brown);
            availableColors.Add(Colors.Cyan);

        }

        public ColorManager GetInstance()
        {
            if (instance == null)
            {
                instance = new ColorManager();
            }

            return instance;
        }

        public void SetColor(Type type, Color color)
        {
            this.ColorMap[type] = color;
        }

        public Color GetColor(Type type)
        {
            //if (!ColorMap.ContainsKey(type))
            //{
            //    Color
            //}
            Color color = this.ColorMap[type];
            return color;
        }


    }
}
